﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Example {
  public partial class WebForm2_6aspx : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {
      ListItem item = new ListItem("黄色");
      ddlColor.Items.Add(item);
    }

    protected void ddlColor_SelectedIndexChanged(object sender, EventArgs e) {
      lblView.Text = ddlColor.SelectedItem.Text;
    }
  }
}